package com.zyh.fengzhuanghejichengzuoye.test3.domain;

public class Monster {
    private String name;
    private int HP;
    private int attack;

    //构造方法
    public Monster() {
    }

    public Monster(String name, int HP, int attack) {
        this.name = name;
        this.HP = HP;
        this.attack = attack;
    }

    //攻击方法
    public void attack(){
        System.out.println("怪物"+this.getName()+"展开攻击");
    }
    //移动方法
    public void move(){

    }

    //getter and setter
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHP() {
        return HP;
    }

    public void setHP(int HP) {
        this.HP = HP;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }
}
